home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / clipper / nftroff.zip / 14.tr < prev    next >
Text File  |  1991-11-21  |  28KB  |  1,663 lines

  1. .de }n
  2. .bp
  3. .sp .5i
  4. ..
  5. .wh -.8i }n
  6. .sp .5i
  7. .po -.4i
  8. .ll 7.5i
  9. .ps 9
  10. .vs 9
  11. .in 0i
  12. .ta 1.63265i
  13. .sp 2
  14. .ne 20
  15. .ps +3
  16. .vs +3
  17. FT_ADAPTER()    Report the type of video adapter installed
  18. .br
  19. .ta
  20. .in 0.08i
  21. .ps -3
  22. .vs -3
  23. .sp 2
  24. \fBFT_ADAPTER()
  25. Report the type of video adapter installed
  26. .in 0i
  27. .br
  28. \l'6.24i'
  29. .br
  30. .sp
  31. .in 0.08i
  32. \fBSyntax
  33. .sp
  34. .in 0.4i
  35. \fBFT_ADAPTER() -> nResult
  36. .sp
  37. .in 0.08i
  38. \fBArguments
  39. .sp
  40. .in 0.4i
  41. None
  42. .sp
  43. .in 0.08i
  44. \fBReturns
  45. .sp
  46. .in 0.4i
  47. Integer representing type of video adapter
  48. .sp
  49. .in 0.64i
  50. .br
  51. 0 - monochrome
  52. .br
  53. 1 - CGA
  54. .br
  55. 2 - EGA
  56. .br
  57. 3 - VGA
  58. .sp
  59. .in 0.08i
  60. \fBDescription
  61. .sp
  62. .in 0.4i
  63. This function is valuable if you use a graphics library and need to
  64. know what type of graphics adapter is installed\.
  65. .sp
  66. The source code is written to adhere to Turbo Assembler\'s IDEAL mode\.
  67. To use another assembler, you will need to rearrange the PROC and
  68. SEGMENT directives, and also the ENDP and ENDS directives (a very
  69. minor task)\.
  70. .sp
  71. .in 0.08i
  72. \fBExamples
  73. .sp
  74. .in 0.4i
  75. .br
  76. iVideo := FT_ADAPTER()
  77. .sp
  78. .br
  79. DO CASE
  80. .in 0.64i
  81. .br
  82. CASE iVideo == 0
  83. .in 0.88i
  84. .br
  85. QOUT( "You have a monochrome adapter\." )
  86. .in 0.64i
  87. .br
  88. CASE iVideo == 1
  89. .in 0.88i
  90. .br
  91. QOUT( "You have a CGA adapter\." )
  92. .in 0.64i
  93. .br
  94. CASE iVideo == 2
  95. .in 0.88i
  96. .br
  97. QOUT( "You have an EGA adapter\." )
  98. .in 0.64i
  99. .br
  100. CASE iVideo == 3
  101. .in 0.88i
  102. .br
  103. QOUT( "You have a VGA adapter\." )
  104. .in 0.4i
  105. .br
  106. ENDCASE
  107. .sp
  108. .in 0.08i
  109. \fBSource:\fR ADAPTER\.ASM
  110. .sp
  111. \fBAuthor:\fR Ted Means
  112. .in 0i
  113. .sp
  114. .in 1.5i
  115. .ti -1.5i
  116. .ta 1.5i
  117. .ft B
  118. See Also:    
  119. .ft R
  120. FT_SETMODE()
  121. .ta 1.63265i
  122. .in 0i
  123. .sp 2
  124. .ne 20
  125. .ps +3
  126. .vs +3
  127. FT_CLS()    Clear screen
  128. .br
  129. .ta
  130. .in 0.08i
  131. .ps -3
  132. .vs -3
  133. .sp 2
  134. \fBFT_CLS()
  135. Clear screen
  136. .in 0i
  137. .br
  138. \l'6.24i'
  139. .br
  140. .sp
  141. .in 0.08i
  142. \fBSyntax
  143. .sp
  144. .in 0.4i
  145. \fBFT_CLS( <nTRow>, <nLCol>, <nBRow>, <nRCol>, <nColor> ) -> NIL
  146. .sp
  147. .in 0.08i
  148. \fBArguments
  149. .sp
  150. .in 0.4i
  151. .ta 2.48i
  152. \fB<nTRow>\fR, \fB<nLCol>\fR, \fB<nBRow>\fR and    \fB<nRCol>\fR are the screen coordinates
  153. .br
  154. .ta
  155. to clear\.
  156. .sp
  157. \fB<nColor>\fR is an integer representing the color attribute\.
  158. The formula is:
  159. .sp
  160. .in 0.56i
  161. nFore + ( nBack * 16 )
  162. .sp
  163. .in 0.4i
  164. The default is black\.
  165. .sp
  166. .in 0.08i
  167. \fBReturns
  168. .sp
  169. .in 0.4i
  170. NIL
  171. .sp
  172. .in 0.08i
  173. \fBDescription
  174. .sp
  175. .in 0.4i
  176. This is a high speed function to clear the screen at the given
  177. coordinates with the given color attribute\.  This does not change
  178. Clipper\'s color settings\.  It uses direct video writes for speed\.
  179. .sp
  180. .sp
  181. .in 0.08i
  182. \fBExamples
  183. .sp
  184. .in 0.4i
  185. FT_CLS( 0, 0, MaxRow(), MaxCol(), 165 )
  186. .sp
  187. This example will clear the entire screen with the colors
  188. bright white on magenta\.
  189. .sp
  190. .in 0.08i
  191. \fBSource:\fR VIDEO1\.C
  192. .sp
  193. \fBAuthor:\fR Robert A\. DiFalco
  194. .in 0i
  195. .ta 1.63265i
  196. .sp 2
  197. .ne 20
  198. .ps +3
  199. .vs +3
  200. FT_GETMODE()    Get the video mode
  201. .br
  202. .ta
  203. .in 0.08i
  204. .ps -3
  205. .vs -3
  206. .sp 2
  207. \fBFT_GETMODE()
  208. Get the video mode
  209. .in 0i
  210. .br
  211. \l'6.24i'
  212. .br
  213. .sp
  214. .in 0.08i
  215. \fBSyntax
  216. .sp
  217. .in 0.4i
  218. \fBFT_GETMODE() -> nVMode
  219. .sp
  220. .in 0.08i
  221. \fBArguments
  222. .sp
  223. .in 0.4i
  224. None\.
  225. .sp
  226. .in 0.08i
  227. \fBReturns
  228. .sp
  229. .in 0.4i
  230. The video mode, as a numeric\.
  231. .sp
  232. .in 0.08i
  233. \fBDescription
  234. .sp
  235. .in 0.4i
  236. Use this function to find out what mode your display adapter is in\.
  237. Uses DOS interrupt 10h to get the mode\.  For a table of modes
  238. available on various graphics adapters, refer to a book such
  239. as Wilton\'s "Programmer\'s Guide to PC & PS/2 Video Systems"
  240. (Microsoft Press)
  241. .sp
  242. .in 0.08i
  243. \fBExamples
  244. .sp
  245. .in 0.64i
  246. function main( cMode )
  247. .sp
  248. .in 0.8i
  249. .br
  250. FT_SETMODE( val( cMode ) )
  251. .br
  252. QOut( "Video mode is: " + str( FT_GETMODE() ) )
  253. .br
  254. return ( nil )
  255. .sp
  256. .sp
  257. .in 0.08i
  258. \fBSource:\fR VIDMODE\.PRG
  259. .sp
  260. \fBAuthor:\fR Glenn Scott
  261. .in 0i
  262. .ta 1.63265i
  263. .sp 2
  264. .ne 20
  265. .ps +3
  266. .vs +3
  267. FT_GETVCUR()    Return info about the cursor on a specified video page
  268. .br
  269. .ta
  270. .in 0.08i
  271. .ps -3
  272. .vs -3
  273. .sp 2
  274. \fBFT_GETVCUR()
  275. Return info about the cursor on a specified video page
  276. .in 0i
  277. .br
  278. \l'6.24i'
  279. .br
  280. .sp
  281. .in 0.08i
  282. \fBSyntax
  283. .sp
  284. .in 0.4i
  285. \fBFT_GETVCUR( [ <nPage> ] ) -> <aCurInfo>
  286. .sp
  287. .in 0.08i
  288. \fBArguments
  289. .sp
  290. .in 0.32i
  291. \fB<nPage>\fR is the video page to get the cursor information for\.
  292. Defaults to the current page, as returned by FT_GETVPG()\.
  293. .sp
  294. .in 0.08i
  295. \fBReturns
  296. .sp
  297. .in 0.4i
  298. A four-element array (<aCurInfo>), set up as follows:
  299. .sp
  300. .br
  301. aCurInfo[1] = Top line of cursor
  302. .br
  303. aCurInfo[2] = Bottom line of cursor
  304. .br
  305. aCurInfo[3] = Character row
  306. .br
  307. aCurInfo[4] = Character column
  308. .sp
  309. .sp
  310. .in 0.08i
  311. \fBDescription
  312. .sp
  313. .sp
  314. .in 0.32i
  315. FT_GETVCUR() uses FT_INT86() to invoke interrupt 10h, function
  316. 3, to return the character cursor location for the specified
  317. video page\.
  318. .sp
  319. The top line and bottom line of cursor are set depending on
  320. the current cursor mode, and are only meaningful in alphanumeric
  321. video modes\.
  322. .sp
  323. For more information on graphics programming, cursors, and
  324. cursor modes, refer to Richard Wilton\'s _Programmer\'s Guide to
  325. PC and PS/2 Video Systems_ (Microsoft Press)\.
  326. .sp
  327. .sp
  328. .in 0.08i
  329. \fBExamples
  330. .sp
  331. .sp
  332. .in 0.4i
  333. .ta 2.24i
  334. .br
  335. aCurInfo := getVCur( 1 )    // Get info on cursor pos in page 1
  336. .br
  337. .ta
  338. .ta 3.12i
  339. .br
  340. QOut("Row: " + str( aCurInfo[3] ) + "    Col: " + str( aCurInfo[4] ) )
  341. .br
  342. .ta
  343. .sp
  344. .sp
  345. .sp
  346. .in 0.08i
  347. \fBSource:\fR VIDCUR\.PRG
  348. .sp
  349. \fBAuthor:\fR Glenn Scott
  350. .in 0i
  351. .ta 1.63265i
  352. .sp 2
  353. .ne 20
  354. .ps +3
  355. .vs +3
  356. FT_GETVPG()    Get the currently selected video page
  357. .br
  358. .ta
  359. .in 0.08i
  360. .ps -3
  361. .vs -3
  362. .sp 2
  363. \fBFT_GETVPG()
  364. Get the currently selected video page
  365. .in 0i
  366. .br
  367. \l'6.24i'
  368. .br
  369. .sp
  370. .in 0.08i
  371. \fBSyntax
  372. .sp
  373. .in 0.4i
  374. \fBFT_GETVPG() -> <nPage>
  375. .sp
  376. .in 0.08i
  377. \fBArguments
  378. .sp
  379. .in 0.4i
  380. None\.
  381. .sp
  382. .in 0.08i
  383. \fBReturns
  384. .sp
  385. .in 0.4i
  386. The video page, as a numeric\.
  387. .sp
  388. .in 0.08i
  389. \fBDescription
  390. .sp
  391. .in 0.4i
  392. Get the currently selected video page
  393. .sp
  394. For more information on graphics programming and video pages,
  395. consult a reference such as _Programmer\'s Guide to PC and PS/2
  396. Video Systems_ (Microsoft Press)\.
  397. .sp
  398. .sp
  399. .in 0.08i
  400. \fBExamples
  401. .sp
  402. .in 0.4i
  403. nPage := FT_GETVPG()
  404. .sp
  405. .in 0.08i
  406. \fBSource:\fR PAGE\.PRG
  407. .sp
  408. \fBAuthor:\fR Glenn Scott
  409. .in 0i
  410. .sp
  411. .in 1.5i
  412. .ti -1.5i
  413. .ta 1.5i
  414. .ft B
  415. See Also:    
  416. .ft R
  417. FT_SETVPG()
  418. .ta 1.63265i
  419. .in 0i
  420. .sp 2
  421. .ne 20
  422. .ps +3
  423. .vs +3
  424. FT_RESTATT()    Restore the attribute bytes of a specified screen region\.
  425. .br
  426. .ta
  427. .in 0.08i
  428. .ps -3
  429. .vs -3
  430. .sp 2
  431. \fBFT_RESTATT()
  432. Restore the attribute bytes of a specified screen region\.
  433. .in 0i
  434. .br
  435. \l'6.24i'
  436. .br
  437. .sp
  438. .in 0.08i
  439. \fBSyntax
  440. .sp
  441. .in 0.4i
  442. \fBFT_RESTATT( <nTop>, <nLeft>, <nBottom>, <nRight>, <cAttributes> ) -> NIL
  443. .sp
  444. .in 0.08i
  445. \fBArguments
  446. .sp
  447. .in 0.4i
  448. \fB<nTop>\fR, \fB<nLeft>\fR, \fB<nBottom>\fR, and \fB<nRight>\fR define the screen region\.
  449. \fB<cAttributes>\fR is a character string containing the attribute bytes
  450. .in 1.52i
  451. for the screen region\.  This will most often be a string
  452. previously returned by FT_SAVEATT(), but any character
  453. string may be used (provided it is of the proper size)\.
  454. .sp
  455. .in 0.08i
  456. \fBReturns
  457. .sp
  458. .in 0.4i
  459. NIL
  460. .sp
  461. .in 0.08i
  462. \fBDescription
  463. .sp
  464. .in 0.4i
  465. This function is similar to Clipper\'s RestScreen(), except that it only
  466. restores the attribute bytes\.  This is useful if you want to change the
  467. screen color without affecting the text\.
  468. .sp
  469. *** INTERNALS ALERT ***
  470. .sp
  471. This function calls the Clipper internal __gtMaxCol to obtain the
  472. maximum column value for the current video mode\.  If you\'re too gutless
  473. to use internals, then this function isn\'t for you\.
  474. .sp
  475. .in 0.08i
  476. \fBExamples
  477. .sp
  478. .in 0.4i
  479. .br
  480. // Restore attributes of row 4
  481. .br
  482. FT_RESTATT( 4, 0, 4, maxcol(), cBuffer)
  483. .sp
  484. .br
  485. // Restore attributes to middle of screen
  486. .br
  487. FT_RESTATT(10,20,14,59,cBuffer)
  488. .sp
  489. .in 0.08i
  490. \fBSource:\fR RESTATT\.ASM
  491. .sp
  492. \fBAuthor:\fR Ted Means
  493. .in 0i
  494. .sp
  495. .in 1.5i
  496. .ti -1.5i
  497. .ta 1.5i
  498. .ft B
  499. See Also:    
  500. .ft R
  501. FT_SAVEATT()
  502. .ta 1.63265i
  503. .in 0i
  504. .sp 2
  505. .ne 20
  506. .ps +3
  507. .vs +3
  508. FT_REVATTR()    Reverse colors of specified screen coordinates
  509. .br
  510. .ta
  511. .in 0.08i
  512. .ps -3
  513. .vs -3
  514. .sp 2
  515. \fBFT_REVATTR()
  516. Reverse colors of specified screen coordinates
  517. .in 0i
  518. .br
  519. \l'6.24i'
  520. .br
  521. .sp
  522. .in 0.08i
  523. \fBSyntax
  524. .sp
  525. .in 0.4i
  526. \fBFT_REVATTR( <nTRow>, <nLCol>, <nBRow>, <nRCol> ) -> NIL
  527. .sp
  528. .in 0.08i
  529. \fBArguments
  530. .sp
  531. .in 0.4i
  532. \fB<nTRow>\fR, \fB<nLCol>\fR, \fB<nBRow>\fR, and \fB<nRCol>\fR are the coordinates of the
  533. screen region\.
  534. .sp
  535. .in 0.08i
  536. \fBReturns
  537. .sp
  538. .in 0.4i
  539. NIL
  540. .sp
  541. .in 0.08i
  542. \fBDescription
  543. .sp
  544. .in 0.4i
  545. This is a high speed function to reverse the color of a specified
  546. screen region without disturbing any text